<#if page??>
<!--设置当前分方式的起始页-->
<#assign currentPage=page.pageNum-2>
<#if currentPage lt 1>
	<#assign currentPage=1>
</#if>
<!--设置当前分方式的结束页-->
<#assign endPage=currentPage+4>
<#if endPage gt page.pages>
	<#assign endPage=page.pages>
</#if>
	<div class="ui-page-list clearfix">
		<input type="hidden" name="pageNum" id="pageNumId" value="${page.pageNum}"/>
		<input type="hidden" name="pageSize" id="pageSizeId" value="${page.pageSize}"/>
		<input type="hidden" name="pageOrderBy" id="pageOrderBy" value="${pageOrderBy!}"/>
		<div class="pull-left pagination-detail pagination">
			<span class="page-total-info">共搜索到<span>${page.total}</span>条记录</span>
			<span class="page-total-cur">当前是<span>${page.pageNum}/${page.pages}</span>页</span>
			<span class="page-list">每页显示 
                <span class="btn-group dropup">
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                <span class="page-size">${page.pageSize }</span>
                <span class="caret"></span>
                </button>
	            <ul class="dropdown-menu">
					<li <#if page.pageSize == 5>class="active"</#if> ><a href="javascript:;" onclick="gotoPageSize(5)">5</a></li>
	                <li <#if page.pageSize == 10>class="active"</#if> ><a href="javascript:;" onclick="gotoPageSize(10)">10</a></li>
	                <li <#if page.pageSize == 20>class="active"</#if> ><a href="javascript:;" onclick="gotoPageSize(20)">20</a></li>
					<li <#if page.pageSize == 50>class="active"</#if> ><a href="javascript:;" onclick="gotoPageSize(50)">50</a></li>
					<li <#if page.pageSize == 100>class="active"</#if> ><a href="javascript:;" onclick="gotoPageSize(100)">100</a></li>
					<li <#if page.pageSize == 500>class="active"</#if> ><a href="javascript:;" onclick="gotoPageSize(500)">500</a></li>
<#--					<li <#if page.pageSize == 1000>class="active"</#if> ><a href="javascript:;" onclick="gotoPageSize(1000)">1000</a></li>-->
	            </ul>
                </span> 条
            </span>
		</div>

		<div class="pull-right pagination">

			<#if page.pageNum gt 1>
			       <li><a class="page-first" aria-label="Previous" href="javascript:gotoPage(1)">首页</a></li>
					<li><a class="page-pre" href="javascript:gotoPage(${page.pageNum-1})">上一页</a></li>
			<#else>
				<li class="disabled"><a class="page-first" aria-label="Previous" href="javascript:;">首页</a></li>
				<li class="disabled"><a class="page-first" href="javascript:;">上一页</a></li>
			</#if>
			<#list currentPage.. endPage as i>
				<#if i==page.pageNum>
					<li class="active"><a href="#">${i}<span class="sr-only">(current)</span></a></li>
				<#else>
					<li class="page-number"><a title='跳到第${i}页' href="javascript:gotoPage(${i});" >${i}</a></li>
				</#if>
			</#list>
			<#if page.pageNum lt page.pages>
				<li ><a class="page-next"  href="javascript:gotoPage(${page.pageNum+1})">下一页</a></li>
				<li ><a class="page-last" aria-label="Previous" href="javascript:gotoPage(${page.pages})">尾页</a></li>
			<#else>
				<li class="disabled"><a class="page-next"  href="javascript:;">下一页</a></li>
				<li class="disabled"><a class="page-last" aria-label="Previous" href="javascript:;">尾页</a></li>
			</#if>
		</div>
	</div>
<script type="text/javascript">
function gotoPage(pageNum)
{
	document.getElementById("pageNumId").value = pageNum;
	page.reload();
}
function gotoPageSize(pageSize){
	document.getElementById("pageSizeId").value = pageSize;
	page.search();
}
</script>
</#if>